/*
 * SqlSyntaxProvider.scala
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.squela
package sql

trait SqlSyntaxProvider {

    type Field[T] = org.squela.Field[T]

    def syntaxValue(value: Any, sb: StringBuilder = new StringBuilder): StringBuilder
    def syntaxAssociation(assoc: FieldAssociation, inWhere: Boolean, sb: StringBuilder = new StringBuilder): StringBuilder
    def syntaxType(fieldType: Field[_], sb: StringBuilder = new StringBuilder): StringBuilder
    def value2Type[T](value: Any, fieldType: Field[T]): T
    def syntaxTableFieldCreate(field: Field[_], sb: StringBuilder = new StringBuilder): StringBuilder
    def syntaxTableFieldsCreate(fields: Seq[Field[_]], sb: StringBuilder = new StringBuilder): StringBuilder
    def mappedTypes: Map[Class[_], String]
}
